/*
 *
 *  * Copyright 2020 New Relic Corporation. All rights reserved.
 *  * SPDX-License-Identifier: Apache-2.0
 *
 */

package org.eclipse.jetty.server;

import com.newrelic.agent.bridge.AgentBridge;
import com.newrelic.api.agent.weaver.Weave;
import com.newrelic.api.agent.weaver.Weaver;

@Weave
public abstract class AsyncContinuation {

    public void complete() {
        AgentBridge.asyncApi.completeAsync(this);
        Weaver.callOriginal();
    }

    protected void recycle() {
        AgentBridge.asyncApi.completeAsync(this);
        Weaver.callOriginal();
    }

    public abstract boolean isResumed();

    public abstract boolean isAsyncStarted();
}
